package com.bocom.controller;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.SessionAttributes;

import com.bocom.entity.Sjbd;
import com.bocom.service.SjbdService;

@Controller
// @SessionAttributes("list")
public class SjbdController {

	@Resource(name = "sjbdService")
	private SjbdService service;

	@RequestMapping(value = "SelectSjbd", method = RequestMethod.GET)
	public String select_kssj(ModelMap modelMap, @RequestParam Date kssj,
			@RequestParam Date jssj) {

		Logger.getLogger(this.getClass()).fatal("Fail kssj=" + kssj);
		Logger.getLogger(this.getClass()).fatal("Fail jssj=" + jssj);
		List<Sjbd> list = service.select_kssj(kssj, jssj);
		modelMap.put("list", list);
		return "/WEB-INF/jsp/loginform.jsp";
	}

}
